package com.school.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.github.pagehelper.PageHelper;
import com.school.mapper.MenuMapper;
import com.school.pojo.Menu;
import com.school.service.MenuService;

@Service
@Transactional
public class MenuServiceImpl implements MenuService{

	@Autowired
	private MenuMapper menuMapper;
	@Override
	public List<Menu> findAll(Menu menu,int page, int pageSize) {
		PageHelper.startPage(page,pageSize);
		return menuMapper.findAll(menu);
	}
	@Override
	public int add(Menu t) {
		return menuMapper.add(t);
	}
	@Override
	public int delbatch(int[] id) {
		
		return menuMapper.delbatch(id);
	}

}
